
<template>
  <div >
    <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
    >
      <el-row>
        <el-col span="12">
          <h1>
            <a href>滴答清单</a>
            <i :class="iconview" style="color: white;cursor:pointer;" @click="chanView"></i>
          </h1>
        </el-col>
        <div :class="menuview ">
          <el-col span="12" style="position: relative;margin-left: 50%">
            <el-menu-item index="1" style="display: inline-block ; margin: 30px" > <a href="" >首页</a></el-menu-item>
            <el-menu-item index="2" style="display: inline-block; margin: 30px"> <a href="" target="_blank">功能介绍</a></el-menu-item>
            <el-menu-item index="3" style="display: inline-block; margin: 30px"><a href="" target="_blank">高级会员</a></el-menu-item>
            <el-menu-item index="4" style="display: inline-block; margin: 30px"><a href="" target="_blank">帮助中心</a></el-menu-item>
            <el-menu-item index="5" style="display: inline-block; margin: 30px"><a href="" target="_blank">消息中心</a></el-menu-item>
            <el-menu-item index="6" style="display: inline-block;margin: 30px"><a href="" target="_blank">登录</a></el-menu-item>
          </el-col>
        </div>
      </el-row>
    </el-menu>
  </div>

</template>

<script>
export default {
  name: 'Header',
  data() {
    return {
      menuview: "hidden-sm-and-down",
      iconview: ["el-icon-s-unfold", "hidden-md-and-up"],
      activeIndex: "1",
      activeIndex2: "1",
      keywords:''
    };
  },
  methods: {
    chanView() {
      if (this.menuview != "") {
        this.iconview[0] = "el-icon-s-fold";
        this.menuview = "";
      } else {
        this.iconview[0] = "el-icon-s-unfold";
        this.menuview = "hidden-sm-and-down";
      }
    },
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>

<style lang="less" scoped>
h1 {
  margin: 0;
  float: left;
  font-size: 2em;
  font-weight: 400;
  padding: 10px;
  a {
    color: #409eff;
    text-decoration: none;
  }
}
.el-menu {
  background: none;
}
.el-menu.el-menu--horizontal {
  border-bottom: none;
}
.el-input {
  margin: 10px 0px;
}
.el-menu-item:hover {
  background-color: rgba(190,198,177,1);
}
</style>
